package com.File_io_.homework;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;

/**
 * @author 宋鑫宇
 * @version 1.0
 */
public class Homework02 {
    public static void main(String[] args) throws Exception {
        BufferedReader br =
                new BufferedReader(new InputStreamReader(
                        new FileInputStream("D:\\idea_WorkSpace\\myjava\\myjava\\src\\com\\File_io_\\hello.txt"), "utf8"));
        int i = 0;
        String line;
        while ((line = br.readLine()) != null) {
            System.out.println((++i) + " " + line);
        }
        br.close();
    }
}
